package com.gitee.cirnochat.chat.model.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.gitee.cirnochat.chat.model.enums.ChatMessageType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Map;

@Data
@Schema(description = "聊天消息对象")
@NoArgsConstructor
@AllArgsConstructor
public class ChatMessage {
    /**
     * 消息ID
     */
    @Schema(description = "消息ID")
    private Long messageId;
    /**
     * 会话ID
     */
    @Schema(description = "会话ID")
    private Long sessionId;

    /**
     * 群聊信息
     */
    @Schema(description = "群聊信息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private ChatGroup group;

    /**
     * 发送者信息
     */
    @Schema(description = "消息所属用户")
    private ChatUser user;
    /**
     * 消息类型
     */
    @Schema(description = "消息类型")
    private ChatMessageType messageType;
    /**
     * 消息内容
     */

    @Schema(description = "消息负载json字符串")
    private Map<String, Object> content;
    /**
     * 回复信息
     */
    @Schema(description = "回复信息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private ChatReply reply;

    /**
     * 是否为系统消息
     */
    @Schema(description = "是否为系统消息")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Boolean system = false;
    /**
     * 发送时间
     */
    @Schema(description = "发送时间")
    private Long createTime;

}
